﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfShopScoreCardCreate.aspx.cs"
    Inherits="msBsc.WebUi.wfShopScoreCardCreate" %>

<!DOCTYPE HTML>
<html>
<head id="Head1" runat="server">
    <title>商家积分卡管理</title>
    <link rel="shortcut icon" href="/themes/Style1/Image/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="/??themes/Style1/StyleQt.css,themes/Style1/address.css" />
    <script src="/??jqPlugin/js/jquery-1.8.3.min.js,js/jBase.js,js/jBPage.js,themes/Style1/jsQt.js,jqPlugin/js/laytpl.js,jqPlugin/laydate/laydate.js"
        type="text/javascript"></script>
    <!--head fix rgn-->
    <script type="text/javascript">
        $(window).load(function () {
            $("#J_CartSwitch li").hover(function () {
                $("#J_FilterBar .floater").animate({ left: 134 * ($(this).index()) + 'px' }, 100);
            }, function () {
            })
            .click(function () {
                $("#J_CartSwitch .current").removeClass("current");
                $(this).addClass("current");

                //                    doToPageNm();
            });
            $("#J_CartSwitch").hover(function () { }, function () {
                $("#J_FilterBar .floater").animate({ left: 134 * ($("#J_CartSwitch .current").index()) + 'px' }, 100);
            });
            $("#J_SmallSubmit").click(function () {
                ShowForm();
            });
            $("#bntGetCash").click(function () {
                ShowGetCashForm();
            });
        });

        $(function () {
            //            $("#zonelistshow li").live("click", function () { if ($(this).hasClass("tb-selected")) { $(this).removeClass("tb-selected") } else { $(this).addClass("tb-selected"); } });

            $(".thead-tbl-address").live("mouseover", function () { $(this).addClass("address-hover").find(".implicit").removeClass("hide"); }).live("mouseout", function () { $(this).removeClass("address-hover").find(".implicit").removeClass("hide").addClass("hide"); });
        });

        function loadlist(_pNum) {
            var _jsParam = new jsonRow();
            _jsParam.AddCell("ACTION", "doloadlist");

            _jsParam.AddCell("TRADING_SID", $('#txts').val());
//            _jsParam.AddCell("INITIAL_DT_S", $("#txtINITIAL_DT_S").val());
//            _jsParam.AddCell("INITIAL_DT_E", $("#txtINITIAL_DT_E").val());
            _jsParam.AddCell("NEW_PAGE_NUM", _pNum || $("#Ratecurrpage").val());
            _jsParam.AddCell("PAGE_ROW_COUNT", "20");
            _jsParam.AddCell("PAGE_ROW_SORT", "");

            ajaxComm(_jsParam);
        };
        function updateTableHtml(_data) {
            var tpl = HtmlUtil.htmlDecode(document.getElementById('list_temp').innerHTML);
            laytpl(tpl).render(_data, function (render) {
                $("#loadlist").empty().html(render);
            });
            $("#Ratecurrpage").val(_data.page);
            createPaging('ratepaginator', _data.page, _data.total, function (_topagenum) { loadlist(_topagenum); });

        };

        var layerform;
        function ShowForm() {
            $.ploadFile("layer", function (script, textStatus) {
                layerform && layer.close(layerform);
                layerform = $.layer({
                    type: 1,
                    shade: [0],
                    fix: true,
                    title: '输入积分数量',
                    maxmin: false,
                    page: { dom: '#ScoreSetBox' },
                    area: ['480px', '280px']
                });
            });
        };
        function dochongzhi() {
            var _jsParam = new jsonRow();
            _jsParam.AddCell("ACTION", "dochongzhi");
            _jsParam.AddCell("txtSetScoreQty", $("#txtSetScoreQty").val());
            ajaxComm(_jsParam); //调用页面回调，并传入参数
        }; 
    </script>
    <style>
        .cart-filter-bar
        {
            overflow: hidden;
            font-size: 12px;
            position: relative;
        }
        
        .cart-filters
        {
            overflow: hidden;
            float: left;
            display: none;
        }
        
        .cart-filters li
        {
            float: left;
            margin-right: 25px;
            display: none;
        }
        
        .cart-filters li a
        {
            display: block;
            color: #404040;
            _float: left;
        }
        
        .cart-filters li a:hover
        {
            text-decoration: none;
        }
        
        .cart-filters .active
        {
            padding-right: 15px;
            background-position: 100% -375px;
            margin-right: 30px;
            display: block;
        }
        
        .cart-filters .active a
        {
            color: #696969;
            font-weight: 700;
            background-position: -257px -345px;
            padding-left: 15px;
        }
        
        .cart-filter-bar .cart-sum
        {
            position: absolute;
            right: 0;
            top: 0;
            height: 25px;
            line-height: 25px;
            font-size: 16px;
        }
        
        .cart-sum .price
        {
            font-family: Arial,Verdana;
            font-weight: 700;
            margin-right: 5px;
            color: #f40;
        }
        
        .cart-sum .price em
        {
            font-family: Verdana,Arial;
            padding-left: 2px;
            font-weight: 700;
        }
        
        .cart-sum .submit-btn
        {
            display: inline-block;
            width: 55px;
            color: #fff;
            background: #f40;
            -webkit-border-radius: 2px;
            -moz-border-radius: 2px;
            -ms-border-radius: 2px;
            border-radius: 2px;
            text-align: center;
            cursor: pointer;
            text-decoration: none;
        }
        
        .cart-sum .submit-btn:hover
        {
            background: #f22d00;
        }
        
        .cart-sum .combine-not-supported, .cart-sum .submit-btn-disabled, .cart-sum .submit-btn-disabled:hover
        {
            background: #e5e5e5;
            color: #9c9c9c;
            cursor: not-allowed;
        }
        
        .cart-sum .combine-not-supported
        {
            width: 100px;
        }
        .switch-cart
        {
            overflow: hidden;
            height: 33px;
        }
        
        .btn-switch-cart
        {
            float: left;
            font-weight: 700;
            font-size: 16px;
            height: 16px;
            width: 134px;
            line-height: 1.1;
            font-family: 'Hiragino Sans GB' , 'Lantinghei SC' , 'Microsoft Yahei' ,SimSun;
            text-align: center;
            padding: 0 0 15px;
            cursor: pointer;
            margin-left: -1px;
        }
        
        .btn-switch-cart a
        {
            padding-left: 25px;
            text-decoration: none;
        }
        
        .btn-switch-cart .pipe
        {
            width: 1px;
            height: 12px;
            display: inline-block;
            background: #e8e8e8;
        }
        
        .switch-cart-4 .pipe
        {
            display: none;
        }
        
        .switch-cart-0 a
        {
            padding-left: 15px;
        }
        
        .btn-switch-cart a:hover
        {
            color: #3c3c3c;
        }
        
        .switch-cart .current a em
        {
            color: #f40;
        }
        
        .btn-switch-cart .number
        {
            color: #f40;
            font-size: 14px;
            margin: 0 30px 0 5px;
            font-weight: 400;
        }
        
        .switch-cart .disabled, .switch-cart .disabled a
        {
            cursor: not-allowed;
        }
        
        .wrap-line
        {
            clear: both;
            background: #e6e6e6;
            height: 2px;
            position: relative;
        }
        
        .wrap-line .floater
        {
            background: #f40;
            height: 2px;
            width: 0;
            position: absolute;
            top: 0;
            left: 0;
            overflow: hidden;
        }
    </style>
</head>
<body>
    <input type="hidden" id="Ratecurrpage" value="1">
    <input type="hidden" id="txts" value="">
    <div id="mallPage" class="tms-page mallAct tmall-  page-not-market">
        <!-- -->
        <!--商城通用顶通-->
        <%=new msBsc.WebUi.Code.QtHtmlGet().GetHeaderTopHtml()%>
        <%=new msBsc.WebUi.Code.QtHtmlGet().GetHeaderLogoDealerHtml("商户管理")%>
        <div id="content" class="content" style="padding-top: 3px;">
            <div class="page lang-zh-S">
                <div id="mytaobao-panel" class="grid-c2">
                    <div class="col-main" id="J_Col_Main" style="padding-bottom: 0;">
                        <div class="bought">
                            <div class="main-wrap">
                                <div id="J_FilterBar" class="cart-filter-bar">
                                    <ul id="J_CartSwitch" class="switch-cart">
                                        <li class="btn-switch-cart switch-cart-0 current"><a href="/d_ShopScoreCardCreate.htm?s="
                                            class="J_MakePoint"><em>全部记录</em><span class="number" id="emD1">0</span><span class="pipe"></span></a></li>
                                        <li class="btn-switch-cart switch-cart-2 "><a href="/d_ShopScoreCardCreate.htm?s=0"
                                            class="J_MakePoint"><em>未充值</em><span class="number" id="emD2">0</span><span class="pipe"></span></a></li>
                                        <li class="btn-switch-cart switch-cart-3 "><a href="/d_ShopScoreCardCreate.htm?s=1"
                                            class="J_MakePoint"><em>已充值</em><span class="number" id="emD3">0</span><span class="pipe"></span></a></li>
                                    </ul>
                                    <div class="cart-sum">
                                   <%--     账户余额：<strong class="price">￥<em id="J_SmallTotal">0.00</em></strong><a id="J_SmallSubmit"
                                            class="submit-btn">充&nbsp;值</a>--%>
                                            可用积分:<strong class="price"><em id="J_SmallTotal">0.00</em></strong>点 &nbsp;<a id="bntCreateCard" href="javascript:void(0);" onclick="ShowForm();" class="submit-btn" style="width:auto; font-size:13px; padding:3px; padding-left:6px; padding-right:6px;">制作充值卡</a>
                                    </div>
                                    <div class="wrap-line">
                                        <div class="floater" style="width: 134px; left: 0px;">
                                        </div>
                                    </div>
                                </div>
                              <%--  <h2 class="h2-single">
                                    <span class="entity" id="J_DeliverTitle">更多查询条件</span></h2>
                                <div id="divCondition" style="margin: 3px; border-style: solid; border-width: 0px;
                                    border-color: #C8D2E0; background-color: #fff; padding: 3px; font-size: 14px;">
                                    <table border="0" cellpadding="0" cellspacing="0" style="float: right;">
                                        <tr>
                                            <td width="100px" align="right" style="padding-right: 5px;">
                                                交易时间起
                                            </td>
                                            <td align="right" width="110px">
                                                <input class="" id="txtINITIAL_DT_S" type="text" value="" style="width: 150px; height: 24px;"
                                                    onclick="laydate()" />
                                            </td>
                                            <td class="label" width="100px" align="right" style="padding-right: 5px;">
                                                交易时间止
                                            </td>
                                            <td class="label" width="100px" align="right">
                                                <input class="" id="txtINITIAL_DT_E" type="text" value="" style="width: 150px; height: 24px;"
                                                    onclick="laydate()" />
                                            </td>
                                            <td align="center" style="padding-left: 20px;">
                                                <input class="btn btn-mini btn-danger" id="btnFinder" type="button" onclick="javascript:loadlist();return false;"
                                                    value="查询" />
                                            </td>
                                        </tr>
                                    </table>
                                    <div style="clear: both;">
                                    </div>
                                </div>--%>
                        <%--        <h2 class="h2-single">
                                    <span class="entity">收支账单列表</span></h2>--%>
                                <div class="tbl-deliver-address" style="background-color: #ffffff;">
                                    <div id="loadlist">
                                    </div>
                                    <div id="ratepaginator">
                                    </div>
                                </div>
                            </div>
                            <span class="mytaobao-rc-bt"><span></span></span>
                        </div>
                    </div>
                    <!-- end col-main -->
                    <div class="col-sub" id="J_Col_Sub">
                        <%=new msBsc.WebUi.Code.QtHtmlGet().GetDealerMenu()%>
                    </div>
                    <div style="clear: both;">
                    </div>
                </div>
                <!-- end mytaobao-panel -->
            </div>
        </div>
        <!-- template -->
        <textarea id="list_temp" style="display: none;">  
        
        <table border="0" cellspacing="0" cellpadding="0" class="tbl-main">
            <colgroup>
                <col  style="width:auto;">
                <col  style="width:auto;">
                <col  style="width:auto;">
                <col  style="width:auto;"> 
            </colgroup>
            <tbody >
            <tr class="thead-tbl-grade">
                <th >
                    充值卡号
                </th>
                <th >
                    积分数量
                </th>
                <th >
                    制作时间
                </th>
                <th >
                    使用时间
                </th> 
            </tr>   
            {{# for(var i = 0, len = d.rows.length; i < len; i++){ }}
            <tr class="thead-tbl-address ">
                <td>
                    {{ d.rows[i].SCORE_CARD_NO }}
                </td>
                <td>
                      {{ d.rows[i].SCORE_QTY }}
                </td>
                <td>
                      {{ d.rows[i].INITIAL_DT }}
                </td>
                <td>
                    {{ d.rows[i].USE_DT }}
                </td>
            </tr> 
            {{# } }}      
                </tbody>
            </table>
        </textarea>
        <div id="ScoreSetBox" style="width: auto; display: none; padding: 30px;">
            <table border="0" cellpadding="0" cellspacing="0" style="float: right; line-height: 35px;
                font-size: 18px;">
                <tr>
                    <td width="150px" align="right" style="padding-right: 5px;">
                        输入积分数量:
                    </td>
                    <td align="right" width="200px">
                        <input class="" id="txtSetScoreQty" type="text" value="" style="width: 200px; height: 24px;" />
                    </td>
                    <td align="center" style="padding-left: 8px;">
                    </td>
                </tr>
            </table>
            <div>
                <center>
                    <span style="color:#c40000; line-height:36px;">注意：制作后将从你商户账户中扣除相应的积分</span>
                </center>
            </div>
            <div>
                <center>
                    <input type="button" class="btn btn-mini btn-danger" onclick="javascript:dochongzhi();return false;"
                        value="确定制作积分卡" id="dobtnSetScore"  />
                </center>
            </div>
        </div> 
        <%=new msBsc.WebUi.Code.QtHtmlGet().GetFloorHtml()%>
    </div>
    <!-- foot script -->
</body>
</html>
